package com.duguo.dynamicmvc.model.validator.exception;

import javax.servlet.http.HttpServletRequest;

public class ValidationExceptionResolver {
	
	public static String EXCEPTION_KEY="validationException";
	
	public ValidationException resolve(HttpServletRequest request){
		ValidationException validationException=(ValidationException)request.getAttribute(EXCEPTION_KEY);
		if(validationException!=null){
			request.removeAttribute(EXCEPTION_KEY);
		}
		return validationException;
	}

}
